Skip to content

test: internalize external documents #2109

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

RyanJWard
Copy link
Contributor

@RyanJWard RyanJWard commented Jul 14, 2025

Description

Verify that external docs are internalized. Skipping due to server side issue
Fix some newly added tests to be more stable

Checklist

  • I have tested my changes locally.
  • I have added necessary documentation or updated existing documentation.
  • I have followed the coding style guidelines of this project.
  • I have added appropriate unit tests.
  • I have reviewed my changes before submitting this pull request.
  • I have linked the issue or issues that are solved to the PR if any.
  • I have assigned this PR to myself.
  • I have added the minimum version decorator to any new backend method implemented.
  • I have made sure that the title of my PR follows Conventional commits style (e.g. feat: extrude circle to cylinder)

@RyanJWard RyanJWard requested a review from smereu July 14, 2025 15:54
@RyanJWard RyanJWard self-assigned this Jul 14, 2025
@RyanJWard RyanJWard added the testing Anything related to tests label Jul 14, 2025
@github-actions github-actions bot removed the testing Anything related to tests label Jul 14, 2025
@RyanJWard RyanJWard added the testing Anything related to tests label Jul 14, 2025
@github-actions github-actions bot removed the testing Anything related to tests label Jul 14, 2025
@github-actions github-actions bot added the testing Anything related to tests label Jul 15, 2025
@@ -535,3 +535,32 @@ def test_design_insert_id_bug(modeler: Modeler):

assert len(design1.components[0].bodies) == 1
assert len(design1.components[1].bodies) == 1


@pytest.mark.skip(reason="Object reference not set to an instance of an object.")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@RobPasMue I am skipping this test until we can fix the server side error

Copy link

codecov bot commented Jul 15, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.64%. Comparing base (3c3cf7f) to head (2a7c0a9).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2109      +/-   ##
==========================================
- Coverage   93.66%   93.64%   -0.02%     
==========================================
  Files         138      138              
  Lines       10156    10156              
==========================================
- Hits         9513     9511       -2     
- Misses        643      645       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@@ -125,7 +125,27 @@ def test_docker_not_available(monkeypatch):
# Replace the launch_docker_modeler function with a dummy function
monkeypatch.setattr(
"ansys.geometry.core.connection.launcher.launch_docker_modeler",
dummy_launch_docker_modeler,
lambda **kwargs: (_ for _ in ()).throw(NotImplementedError("Docker not available")),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change should avoid anything from trying to launch

assert _is_port_available(available_port, host) is True

# Test an unavailable port by binding it
unavailable_port = 5001
unavailable_port = find_available_port()
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
s.bind((host, unavailable_port)) # Bind the port to make it unavailable
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One of our pipelines had this test fail due to "PermissionError: [WinError 10013] An attempt was made to access a socket in a way forbidden by its access permissions"

@pytest.mark.parametrize(
"port, should_raise, expected_message",
[
(5000, False, None), # Test for an available port
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same pipeline error as above: PermissionError: [WinError 10013] An attempt was made to access a socket in a way forbidden by its access permissions

@RyanJWard RyanJWard marked this pull request as ready for review July 15, 2025 19:08
@RyanJWard RyanJWard requested a review from a team as a code owner July 15, 2025 19:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testing Anything related to tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants